.\"
.\" This file and its contents are supplied under the terms of the
.\" Common Development and Distribution License ("CDDL"), version 1.0.
.\" You may only use this file in accordance with the terms of version
.\" 1.0 of the CDDL.
.\"
.\" A full copy of the text of the CDDL should have accompanied this
.\" source.  A copy of the CDDL is also available via the Internet at
.\" http://www.illumos.org/license/CDDL.
.\"
.\"
.\" Copyright 2015 Joyent, Inc.
.\"
.Dd May 11, 2016
.Dt PROC_STR2FLT 3PROC
.Os
.Sh NAME
.Nm proc_str2flt ,
.Nm proc_str2sig ,
.Nm proc_str2sys
.Nd convert a string to a fault, signal, or system call
.Sh SYNOPSIS
.Lb libproc
.In libproc.h
.Ft int
.Fo proc_str2flt
.Fa "const char *str"
.Fa "int *fltnum"
.Fc
.Ft int
.Fo proc_str2sig
.Fa "const char *str"
.Fa "int *signum"
.Fc
.Ft int
.Fo proc_str2sys
.Fa "const char *sys"
.Fa "int *sysnum"
.Fc
.Sh DESCRIPTION
The
.Fn proc_str2flt ,
.Fn proc_str2sig ,
and
.Fn proc_str2sys
functions convert a string into the corresponding fault, signal, and
system call number respectively and stores the resulting value in
.Fa fltnum ,
.Fa signum ,
or
.Fa sysnum
respectively.
.Sh RETURN VALUES
Upon successful completion, the
.Fn proc_str2flt ,
.Fn proc_str2sig ,
and
.Fn proc_str2sys
functions return
.Sy 0
and update
.Fa fltnum ,
.Fa signum ,
and
.Fa sysnum
respectively.
Otherwise,
.Sy -1
is returned to indicate that a conversion could not take place.
.Sh INTERFACE STABILITY
.Sy Uncommitted
.Sh MT-LEVEL
.Sy MT-Safe
.Sh SEE ALSO
.Xr libproc 3LIB ,
.Xr proc_fltname 3PROC ,
.Xr proc_fltset2str 3PROC ,
.Xr proc_signame 3PROC ,
.Xr proc_sigset2str 3PROC ,
.Xr proc_str2fltset 3PROC ,
.Xr proc_str2sigset 3PROC ,
.Xr proc_str2sysset 3PROC ,
.Xr proc_sysset2str 3PROC ,
.Xr proc 5
